<?php
	/**
	 * @ignore
	 */
	if(defined("apl_".__FILE__))
		return;
	define("apl_".__FILE__,"apl_".__FILE__);
	
	require_once( APL_ROOT."/apl.php");
	require_once( APL_ROOT."/apl_constants.php");
	
	/**
	* AplRequest is the main class to process parameters
	* (clean,discard or whatever )  passed via _REQUEST
	* @package apl
	* @subpackage components
	*/
	class AplRequest{
		
		public function getParameter( $paramName, $defaultValue = null ){
			return Apl::nvl($_REQUEST[$paramName],$defaultValue );
		}

		public function setParameter( $paramName, $newValue){
			$_REQUEST[ $paramName ] = $newValue;
		}

		public function getIntParameter( $paramName, $defaultValue = -1){			
			$returnValue = $this->getParameter( $paramName, $defaultValue );
			return ( is_numeric($returnValue)?$returnValue:$defaultValue );
		}

		public function getCharParameter( $paramName, $defaultValue=null ){
			$returnValue = $this->getParameter( $paramName, $defaultValue );
			if( !get_magic_quotes_gpc())
				$returnValue = addslashes( $returnValue );
			return $returnValue;
		}
	}

?>